import Oidc from 'oidc-client'

//authServer 自己在环境变量中配置

const host = window.location.origin

const authServer = process.env.VUE_APP_OIDC



const userManager = new Oidc.UserManager({

  authority: authServer,  // server 地址

  client_id: '67a79331-1f76-4a77-976e-5e5dbbeb5432',  // client id

  post_logout_redirect_uri: `${host}`, // 退出登录

  redirect_uri: `${host}/oidc`,   //

  response_type: 'id_token',  //Implicit

  scope: ' profile openid api.full_access',

  automaticSilentRenew:true,

  silent_redirect_uri: `${host}/silent-refresh-redirect`,

  accessTokenExpiringNotificationTime: 10,

})
export default userManager;
